<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>垂直居中文字</title>
		<style type="text/css">
			body{
				margin: 0;
				padding: 0;
			}
			.box{
				width: 100%;
				height: 300px;
				background-color: red;
				justify-content: center;
				align-items: center;
				display: -webkit-flex;
			}
			
		</style>
	</head>
	<body>
		<div class="box">这是一段垂直居中的文字</div>
	</body>
</html>
